<%--
  Created by IntelliJ IDEA.
  User: tangyunyuan
  Date: 2021/4/7
  Time: 11:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="<%=request.getContextPath()%>/jsgol/jQuery.js"></script>
</head>
<style>
    #navMore {
        position: absolute;
        top: -17px;
        left: 120px;
    }
</style>
<body>
<div style="position: relative;">
    <div>
        <img src="idemge/top1.jpg" alt="">
        <img src="idemge/top2.jpg" alt="">
    </div>
    <div style="position: relative">

        <img style="width:800px;height: 31px;" src="idemge/center.jpg" alt="">
        <h4 style="position: absolute;top: 3px;left: 50px;color: red;" id="nav">
            <%= session.getAttribute("nav") == null ? "首页" : session.getAttribute("nav")%>
        </h4>
        <h5 id="navMore">

        </h5>
    </div>

    <button style="position: absolute;left: 190px;top: 31px;background-color: #e25926;color: white;"
            onclick="changePage(1)">部门管理
    </button>
    <button style="position: absolute;left: 282px;top: 31px;background-color: #e25926;color: white"
            onclick="changePage(2)">员工管理
    </button>
    <button style="position: absolute;left: 372px;top: 31px;background-color: #e25926;color: white"
            onclick="changePage(3)">招聘管理
    </button>
    <button style="position: absolute;left: 462px;top: 31px;background-color: #e25926;color: white"
            onclick="changePage(4)">培训管理
    </button>
    <button style="position: absolute;left: 552px;top: 31px;background-color: #e25926;color: white"
            onclick="changePage(5)"> 奖惩管理
    </button>
    <button style="position: absolute;left: 642px;top: 31px;background-color: #e25926;color: white"
            onclick="changePage(6)">薪资管理
    </button>
    <button style="position: absolute;left: 718px;top: 31px;background-color: white;"
            onclick="changePage(7)">系统管理
    </button>


    <div id="time" style="margin: 130px auto;position: absolute;left: 400px;top: 14px;">

    </div>


    <button style="position: absolute;left: 543px;top: 144px;background-color: #525050;color: white" onclick="location.href = '<%= request.getContextPath()%>/modify.jsp'">用户修改
    </button>
    <button style="position: absolute;left: 634px;top: 144px;background-color: #525050;color: white"
            onclick="location.href = '<%= request.getContextPath()%>/login.jsp'">返回首页
    </button>
    <button style="position: absolute;left: 717px;top: 144px;background-color: #525050;color: white"
            onclick="location.href = '<%= request.getContextPath()%>/main.jsp',alert('已安全退出')">安全退出
    </button>
</div>
</body>
<script type="text/javascript" src="jsgol/protect.js"></script>
<script>
    function changePage(type) {
        if (type === 1) {
            location.href = '<%= request.getContextPath()%>/queryALl';
        } else if (type === 2) {
            location.href = '<%= request.getContextPath()%>/stalist';
        } else if (type === 3) {
            location.href = '<%= request.getContextPath()%>/inlist';
        } else if (type === 4) {
            location.href = '<%= request.getContextPath()%>/tralist';
        }else  if(type === 5){
            location.href = '<%= request.getContextPath()%>/rewlist';
        }else if (type === 6){
            location.href = '<%= request.getContextPath()%>/salary';
        }else if (type === 7){
            location.href = '<%= request.getContextPath()%>/admi';
        }
    }

    function writeDate() {
        document.getElementById('time').innerHTML = new Date();
    }

    document.getElementById('time').innerHTML = `${new Date ().getFullYear()}年${new Date().getMonth() + 1}月${new Date().getDate()}日`;

</script>
</html>
